<template>
  <view class="home fboxCol Ycenter">
    <!--        <view class="page-title">企业点点详情</view>-->
    <view class="content-box flex1 fboxCol Ycenter Xcenter">
      <view class="img"><img class="img" src="https://ebc-prod.cdn.benwunet.com/uni-static/h5/file.png" alt=""></view>
      <view class="tit mt30 font32">{{details.filename}}</view>
      <view class="info mt20 font22">{{ details.gmtCreate }} {{ details.fileSize }}KB</view>
    </view>
    <view class="fboxRow bottom font24">
        <view class="flex1 fboxCol Ycenter Xcenter"><van-icon size="24" name="down" />下载</view>
        <view class="flex1 fboxCol Ycenter Xcenter"><van-icon size="24" name="share-o" />转发</view>
        <view class="flex1 fboxCol Ycenter Xcenter"><img class="icon" src="https://ebc-prod.cdn.benwunet.com/uni-static/h5/share.png" alt="">分享</view>
    </view>
    <DownloadBtn linkId="usr1hbu44vl724ms" :linkData="linkData" />
  </view>
</template>

<script>
// 接口
import { fileDetail } from '@/api/h5.js'
import DownloadBtn from '@/components/download-btn-h5/download_btn.vue'

export default {
  components: { DownloadBtn },
  data() {
    return {
      id: '',
      details: {
        // creatorId: 'vip00000001301',
        // fileSize: 17507,
        // fileUrl: 'https://ebc-prod.obs.cn-north-4.myhuaweicloud.com/circle/v2.1.0开发排期（10.13～10.27）.xlsx',
        // filename: 'v2.1.0开发排期（10.13～10.27）.xlsx',
        // gmtCreate: '2022-12-26 19:59:32',
        // id: '352422082321055744',
        // realName: null
      },
      linkData:{}
    }
  },
  created() {
    this.getAttached()
  },
  methods: {
    getAttached() {
      const { id } = this.$route.query
      fileDetail({ id }).then((res) => {
        this.details = res.data
        this.linkData = {
          id: res.data.id,
          'um_from_appkey': '6375a8c088ccdf4b7e678f20'
        }
      })
    }
  }
}
</script>

<style scoped>
.home {height: calc(100vh);}
.img{width: 87rpx;height: 110rpx;}
.tit{color: #00103D;}
.info{color: #6264A3;}
.bottom{width: 100%;}
.icon{width: 40rpx;}
</style>

